import request from '@/utils/request'

// 查询用户选择记录列表
export function listWhereToGoUserChoice(query) {
  return request({
    url: '/play/whereToGoUserChoice/list',
    method: 'get',
    params: query
  })
}

// 根据用户ID查询选择记录
export function listWhereToGoUserChoiceByUser(userId) {
  return request({
    url: '/play/whereToGoUserChoice/listByUser/' + userId,
    method: 'get'
  })
}

// 根据模块ID查询选择记录
export function listWhereToGoUserChoiceByModule(moduleId) {
  return request({
    url: '/play/whereToGoUserChoice/listByModule/' + moduleId,
    method: 'get'
  })
}

// 查询用户选择记录详细
export function getWhereToGoUserChoice(id) {
  return request({
    url: '/play/whereToGoUserChoice/' + id,
    method: 'get'
  })
}

// 新增用户选择记录
export function addWhereToGoUserChoice(data) {
  return request({
    url: '/play/whereToGoUserChoice',
    method: 'post',
    data: data
  })
}

// 修改用户选择记录
export function updateWhereToGoUserChoice(data) {
  return request({
    url: '/play/whereToGoUserChoice',
    method: 'put',
    data: data
  })
}

// 删除用户选择记录
export function delWhereToGoUserChoice(id) {
  return request({
    url: '/play/whereToGoUserChoice/' + id,
    method: 'delete'
  })
}

// 记录用户选择（包含更新选项热度值）
export function recordUserChoice(data) {
  return request({
    url: '/play/whereToGoUserChoice/recordChoice',
    method: 'post',
    data: data
  })
} 